﻿using Microsoft.AspNetCore.Builder;

namespace RuoVea.ExWeb.SafeList
{
    /// <summary>
    ///  IOptions
    /// </summary>
    public static class SafeIpOptions
    {
        /// <summary>
        /// 限制指定IP访问
        /// </summary>
        /// <param name="app"></param>
        public static void SafeIps(this IApplicationBuilder app)
        {
            app.UseMiddleware<SafeListMiddleware>(ExConfig.Appsettings.app("SafeIps"));
        }
    }
}
